<template>
  <div class="dashboard-container">
    <div class="dashboard-text">
      <!-- 头部内容 -->
      <el-card class="header-card">
        <div>
          <div class="fl headL">
            <div class="headImg">
              <img :src="$store.getters.avatar">
            </div>
            <div class="headInfoTip">
              <p class="firstChild">
                你好呀，{{ $store.getters.name }}，祝你开心每一天！
              </p>
              <p class="lastChild">你好呀，{{ $store.getters.name }}，祝你开心每一天！</p>
            </div>
          </div>
          <div class="fr" />
        </div>
      </el-card>

      <!-- 图标 -->
      <el-row>
        <el-card class="process">
          <div class="processBox">
            <h2>流程申请</h2>
          </div>
          <div class="sideNav">
            <el-button class="sideBtn" type="primary" round>加班离职</el-button>
            <el-button class="sideBtn" type="success" round>请假调休</el-button>
            <el-button class="sideBtn" type="info" round>审批列表</el-button>
            <el-button class="sideBtn" type="warning" round>我的信息</el-button>
          </div>
        </el-card>
      </el-row>

      <el-row type="flex" justify="space-between">
        <el-col :span="12">
          <!-- 左侧内容 -->
          <!-- 公告 -->
          <!-- 分页标签组件 -->
          <el-card class="box-card news-left">
            <el-tabs type="border-card">
              <el-tab-pane>
                <span slot="label"><i class="el-icon-date" /> 最新消息</span>
                <div>
                  <div class="newsBox-left">
                    <h3>发挥结构性杠杆作用，租购并举促进良性循环</h3>
                    <p class="pOne">市场研究部  第5组研究院 2022-04-13 18:32:37</p>
                    <p class="pTwo">当前房地产市场存在四个“不循环”，而过去房地产调控工具难以应对这四个死结。</p>
                  </div>
                  <div class="newsBox-left">
                    <h3>许小乐：当下房地产的破局点在哪里？</h3>
                    <p class="pOne">市场研究部  第5组研究院 2022-04-13 18:32:37</p>
                    <p class="pTwo">文章导读： 解铃还须系铃人。</p>
                  </div>
                </div>
              </el-tab-pane>
              <el-tab-pane>
                <span slot="label"><i class="el-icon-document" /> 周期报告</span>
                <div class="contentItem">
                  <ul class="noticeList">
                    <li>
                      <div class="item">
                        <img src="@/assets/common/wangjiaer01.jpeg" alt="">
                        <div>
                          <p>
                            <span class="col">朱继柳</span> 发布了
                            第1期“传智大讲堂”互动讨论获奖名单公布
                          </p>
                          <p>2018-07-21 15:21:38</p>
                        </div>
                      </div>
                    </li>
                    <li>
                      <div class="item">
                        <img src="@/assets/common/wangjiaer02.jpeg" alt="">
                        <div>
                          <p>
                            <span class="col">朱继柳</span> 发布了
                            第2期“传智大讲堂”互动讨论获奖名单公布
                          </p>
                          <p>2018-07-21 15:21:38</p>
                        </div>
                      </div>
                    </li>
                  </ul>
                </div>
              </el-tab-pane>
              <el-tab-pane>
                <span slot="label"><i class="el-icon-s-custom" /> 客户研究</span>
                <div class="contentItem">
                  <ul class="noticeList">
                    <li>
                      <div class="item">
                        <img src="@/assets/common/wangjiaer01.jpeg" alt="">
                        <div>
                          <p>
                            <span class="col">朱继柳</span> 发布了
                            第1期“传智大讲堂”互动讨论获奖名单公布
                          </p>
                          <p>2018-07-21 15:21:38</p>
                        </div>
                      </div>
                    </li>
                    <li>
                      <div class="item">
                        <img src="@/assets/common/wangjiaer02.jpeg" alt="">
                        <div>
                          <p>
                            <span class="col">朱继柳</span> 发布了
                            第2期“传智大讲堂”互动讨论获奖名单公布
                          </p>
                          <p>2018-07-21 15:21:38</p>
                        </div>
                      </div>
                    </li>
                  </ul>
                </div>
              </el-tab-pane>
              <el-tab-pane>
                <span slot="label"><i class="el-icon-s-tools" /> 帮助中心</span>
                <div class="box-card">
                  <div class="sideLink">
                    <el-row>
                      <el-col :span="8">
                        <a href="#">
                          <span class="icon iconGuide" />
                          <p>入门指南</p>
                        </a>
                      </el-col>
                      <el-col :span="8">
                        <a href="#">
                          <span class="icon iconHelp" />
                          <p>在线帮助手册</p>
                        </a>
                      </el-col>
                      <el-col :span="8">
                        <a href="#">
                          <span class="icon iconTechnology" />
                          <p>联系技术支持</p>
                        </a>
                      </el-col>
                    </el-row>
                  </div>
                </div>
              </el-tab-pane>
            </el-tabs>
          </el-card>
        </el-col>

        <!-- 右侧内容 -->
        <el-col :span="12">
          <!-- 左侧内容 -->
          <el-card>

            <h2>绩效指数</h2>

            <pie /></el-card>
        </el-col>
      </el-row>

    </div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
import pie from '@/views/dashboard/components/pie.vue'

export default {
  name: 'Dashboard',
  components: { pie: pie },
  computed: {
    ...mapGetters([
      'name'
    ])
  }

}
</script>

<style lang="scss" scoped>
.dashboard-container {
  .headImg {
    float: left;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #999;
    img {
      width: 100%;
      height: 100%;
      border-radius: 50%;
    }
  }

  .headInfoTip {
    padding: 25px 0 0;
    margin-left: 120px;
    p {
      padding: 0 0 15px;
      margin: 0;
      &.firstChild {
        font-size: 24px;
      }
      &.lastChild {
        font-size: 20px;
        color: #7f8c8d;
      }
    }
  }
  .box-card {
    height: 370px;
  padding: 5px 10px;
  margin-top: 20px;
  }
  .news-left{
    .newsBox-left{
      border-bottom: 1px solid #666;
      .pOne{
        font-size: 12px;
        color: #666;
      }
      .pTwo{
        font-size: 15px;
         color: #409eff;
      }
    }
  }
   .contentItem {
    min-height: 300px;
    .item {

      display: flex;
      padding: 18px 0 10px;
      border-bottom: solid 1px #ccc;
      .col {
        color: #8a97f8;
      }
      img {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        margin-right: 10px;
      }
      p {
        padding: 0 0 8px;
      }
    }
  }

    li{
        list-style: none;
      }

      .sideLink {
        margin-top: 45px;
  text-align: center;
  .icon {
    display: inline-block;
    width: 76px;
    height: 76px;
    background: url("./../../assets/common/icon.png") no-repeat;
  }
  .iconGuide {
    background-position: 0 0;
  }
  .iconHelp {
    background-position: -224px 0;
  }
  .iconTechnology {
    background-position: -460px 0;
  }
}
.process{
margin-top: 10px;
h2{
color: #409eff;
}
}
}

</style>
